<?php
	$cancel_url=$this->url(array(
		'module'=>'userWu',
		'controller'=>'user',
	    'action'=>'index',
	),null,true);
	$form=$this->form;
	Application_Model_Decorator::removeAllDecorator($form); 
	$tr = Application_Form_FrmLanguages::getCurrentlanguage();
?>
<title><?php echo $tr->translate("CHANGE_PASSWORD");?></title>
<script>
		jQuery(document).ready(function(){
		    // binds form submission and fields to the validation engine
		jQuery("#frm").validationEngine('attach', {promptPosition : "centerRight"});
		    
		});
		function validatePassword(field)
        {
            	var com=$('#confirm_password').val();
            	var pwd=$('#password').val();
        		if(com!=pwd) return '*Password mismatch!';
        }
</script>
<?php echo $this->msg; ?>
<div class="right" style="width: 97%; padding: 10px;">
<form id="frm" action="<?php echo $form->getAction(); ?>" method="post" enctype="application/x-www-form-urlencoded">
	<div class="btn" align="right">
		    <button type="submit" class="positive" name="save">
		        <img src="<?php echo BASE_URL;?>/images/icon/apply2.png" alt=""/>
		        <?php echo $tr->translate('SAVE');?>
		    </button>
		    <a href="<?php echo $cancel_url; ?>" class="negative">
		        <img src="<?php echo BASE_URL;?>/images/icon/cross.png" alt=""/>
		        <?php echo $tr->translate('CANCEL');?>
		    </a>
   </div>
	<div class="view-table">
		<div class="head_form">
			<?php echo $tr->translate('CHANGE_PSW');?>
		</div>
		<div class="contain_form">
			<table style="width: 50%;">
				<tr>
					<td class="field"><?php echo $tr->translate('OLD_PASSWORD');?></td>
					<td class="add-edit"><?php echo $form->getElement('current_password');?></td>
				</tr>
				<tr>
					<td class="field"><?php echo $tr->translate('NEW_PASSWORD');?></td>
					<td class="add-edit"><?php echo $form->getElement('password');?></td>
				</tr>
				<tr>
					<td class="field"><?php echo $tr->translate('RE_PASSWORD');?></td>
					<td class="add-edit"><?php echo $form->getElement('confirm_password');?></td>
				</tr>
			</table>
		</div>
	</div>
</form>
</div>